using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel.Activation;
using SinBiota.Model.Business.MapServices.Datatypes;
using SinBiota.Model.Business.MapServices.Interfaces;
using System.ServiceModel;

namespace Sinbiota.Web.Services
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class MapService
    {
        //required interfaces:
        private readonly ITileLayerServices _tileLayerServices;

        public MapService()
        {
            // Get directly from StructureMap
            _tileLayerServices = StructureMap.ObjectFactory.GetInstance<ITileLayerServices>();
        }

        [OperationContract]
        public AvailableTileLayers GetAvailableTileLayers()
        {
            return _tileLayerServices.GetAvailableTileLayers();
        }

    }   

    //[DataContract]
    //public class MultiPolygon
    //{
    //    [DataMember]
    //    public String Name { get; set; }

    //    [DataMember]
    //    public List<ComplexPolygon> ComplexPolygons { get; set; }
    //}

    //[Serializable]
    //public class ComplexPolygon
    //{
    //    public String ExteriorRing { get; set; }
    //    public List<String> InteriorRings { get; set; }

    //    public ComplexPolygon(String exteriorRing, List<String> interiorRings)
    //    {
    //        this.ExteriorRing = exteriorRing;
    //        this.InteriorRings = interiorRings;
    //    }
    //} 
}

